package ink.xiaobaibai.service;

import com.baomidou.mybatisplus.extension.service.IService;
import ink.xiaobaibai.bo.DeviceOpenInfoBo;
import ink.xiaobaibai.bo.UserAndDep;
import ink.xiaobaibai.common.PageInfo;
import ink.xiaobaibai.entity.OzoneDevice;
import ink.xiaobaibai.vo.UserByDeviceVo;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author xiaobaibai
 * @since 2021-05-22
 */
public interface IOzoneDeviceService extends IService<OzoneDevice> {

    public UserAndDep getAdminUserAndDepByDeviceId(Integer deviceId);

    public PageInfo<OzoneDevice> getListByAdmin(Integer pageNum, Integer pageSize, Integer adminUserId, Integer depId, String provinceCity, String status);

    /**
     * 根据userId获取负责人信息(包括部门名称的)
     */
    public UserByDeviceVo getUserInfoByUserId(Integer userId);

    /**
     * 根据臭氧id获取 设备码+延时时间+氧气设备码
     */
    public DeviceOpenInfoBo getDeviceOpeInfo(Integer id);

    /**
     * 机器是否属于当前人员的部门
     */
    public boolean identicalDeviceDepByUserId(Integer userId, Integer deviceId);

    /**
     * 机器是否属于当前人员的部门 (机器码)
     */
    public boolean identicalDeviceDepByUserId(Integer userId, String deviceCode);

    /**
     * 通过deviceCode获取对应氧气机code
     */
    public String getOxygenCodeByDeviceCode(String deviceCode);

}
